﻿
using System;
using System.Collections.Generic;

namespace Red.Core.Containers
{
    /// <summary>
    ///     Collection with ranged operations
    /// </summary>
    public interface IRangedCollection<T> : ICollection<T>
    {
        /// <summary>
        ///     Removes all the items that satisfy the given predicate
        /// </summary>
        int RemoveAll( Predicate<T> predicate );

        /// <summary>
        ///     Replaces the content with given elements
        /// </summary>
        void ResetWith( IEnumerable<T> elements );

        /// <summary>
        ///     Adds elements form a given range
        /// </summary>
        void AddRange( IEnumerable<T> elements );
    }
}
